# 提交的数据为表单数据
import requests

url = 'https://httpbin.org/post'
data = {
    'user': 'tynam',
    'password': '123456'}

response = requests.post(url=url,data=data)
print(response.text)

# {
#   "args": {},
#   "data": "",
#   "files": {},
#   "form": {
#     "password": "123456",
#     "user": "tynam"
#   },
#   "headers": {
#     "Accept": "*/*",
#     "Accept-Encoding": "gzip, deflate",
#     "Content-Length": "26",
#     "Content-Type": "application/x-www-form-urlencoded",
#     "Host": "httpbin.org",
#     "User-Agent": "python-requests/2.32.3",
#     "X-Amzn-Trace-Id": "Root=1-684157c3-154053454ce3dda25b6af589"
#   },
#   "json": null,
#   "origin": "116.24.222.235",
#   "url": "https://httpbin.org/post"
# }

